package com.may.consumer.bootstrap.controller;

import com.may.consumer.api.ConsumerHelloServiceApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/c")
public class ConsumerHelloController {

    @Autowired
    private ConsumerHelloServiceApi helloService;

    @GetMapping
    public String hello(){
        return helloService.hello("马野");
    }

    @GetMapping("/c")
    public String consumerHello(){
        return helloService.consumerHello("马野");
    }
}
